import request from '@/utils/request'

//统一字典下拉框查询
export function adminDict(params) {
    return request({
        url: `common/v1/adminDict`,
        method: 'get',
        params
    })
}
//查询城市数据
export function getCity(params) {
    return request({
        url: `/common/v1/city`,
        method: 'get',
        params
    })
}
//行业类型
export function shopTypeTree(params) {
    return request({
        url: `/merchant/v1/shopTypeTreeAll`,
        method: 'get',
        params
    })
}
// 未入驻商家--列表
export function getList(params) {
    return request({
        url: `/merchant/shop/spurious/v1`,
        method: 'get',
        params
    })
}
//未入驻商家--查看
export function getspuriousDetail(shopID) {
    return request({
        url: `/merchant/shop/spurious/v1/${shopID}`,
        method: 'get'
    })
}
// 未入驻商家--编辑
export function editSpurious(data) {
    return request({
      url: `/merchant/shop/spurious/v1`,
      method: 'put',
      data
    })
}
//新建
export function addHlb(data) {
    return request({
      url: '/merchant/shop/spurious/v1',
      method: 'post',
      data
    })
}
//删除
export function getDelete(shopID) {
    return request({
      url: `/merchant/shop/spurious/v1/${shopID}`,
      method: 'DELETE'
    })
}
// 未入驻商家--状态修改
export function changeStatus(params) {
    return request({
      url: `/merchant/shop/spurious/v1/changeStatus`,
      method: 'put',
      headers: {
        'Content-Type': 'application/x-www-form-urlencoded'
      },
      params
    })
}
// 推荐商户管理-列表
export function getmanageList(params) {
    return request({
        url: `/merchant/shop/recommend/v1`,
        method: 'get',
        params
    })
}
// 推荐商户管理-下拉列表
export function selectList(params) {
    return request({
        url: `/merchant/shop/manage/v1/selectList`,
        method: 'get',
        params
    })
}
//添加推荐商户
export function addmanage(data) {
    return request({
      url: '/merchant/shop/recommend/v1/',
      method: 'post',
      data
    })
}
//修改推荐商户
export function modifymanage(data) {
    return request({
      url: '/merchant/shop/recommend/v1/',
      method: 'put',
      data
    })
}
//删除推荐商户
export function manageDelete(id) {
    return request({
      url: `/merchant/shop/recommend/v1/${id}`,
      method: 'DELETE'
    })
}
//爆卡推荐列表查询
export function recommendLs(params) {
    return request({
        url: `/asset/recommend/v1`,
        method: 'get',
        params
    })
}
//店铺下拉列表 分页(爆卡推荐)
export function shopPageLs(params) {
    return request({
        url: `/common/v1/shopPage`,
        method: 'get',
        params
    })
}
//爆卡下拉(爆卡推荐)
export function cardExperienceSelect(params) {
    return request({
        url: `/asset/experience/v1/cardExperienceSelect`,
        method: 'get',
        params
    })
}
//新增爆卡推荐
export function addRecommend(data) {
    return request({
      url: '/asset/recommend/v1',
      method: 'post',
      data
    })
}
//修改爆卡推荐
export function modifyBurstcard(data) {
    return request({
      url: '/asset/recommend/v1',
      method: 'put',
      data
    })
}
//删除推荐商户
export function recommendDelete(id) {
    return request({
      url: `/asset/recommend/v1/${id}`,
      method: 'DELETE'
    })
}
//查询物联网设备列表
export function equipmentLs(params) {
    return request({
        url: `/merchant/equipment/list`,
        method: 'get',
        params
    })
}
//查询商家下拉框(收银机页面)
export function shopSelectDown(params) {
    return request({
        url: `/common/v1/shopSelectDown`,
        method: 'get',
        params
    })
}
//新增物联网设备
export function equipmentAdd(data) {
    return request({
      url: '/merchant/equipment/',
      method: 'post',
      data
    })
}
//查询物联网设备详情
export function equipmentDetail(id) {
    return request({
      url: `/merchant/equipment/${id}`,
      method: 'get'
    })
}
//解绑物联网设备
export function unboundSumit(id) {
    return request({
      url: `/merchant/equipment/unbind/${id}`,
      method: 'put',
    })
}
//更新物联网设备
export function equipmentUpdate(data) {
    return request({
      url: '/merchant/equipment/',
      method: 'put',
      data
    })
}
//删除物联网设备
export function equipmentDelete(id) {
    return request({
      url: `/merchant/equipment/${id}`,
      method: 'DELETE'
    })
}
